<template>
  <div id="app">
   <h1>app</h1>
   <router-link to="/home">首页</router-link>
   | <router-link to="/route2">单页面多路由区域</router-link>
   | <router-link :to="{name:'param',params:{id:77}}">param页</router-link>
   <transition name="fade" mode="out-in">
    <router-view />
   </transition>
  </div>
</template>

<script>
export default {
  name: 'App'
}
</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
.fade-enter {
  opacity:0;
}
.fade-leave{
  opacity:1;
}
.fade-enter-active{
  transition:opacity .5s;
}
.fade-leave-active{
  opacity:0;
  transition:opacity .5s;
}
</style>
